package com.example.pilipili.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Size;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author liyv
 * @since 2023-12-01
 */
@Data
public class User implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Size(max = 20)
    private String name;
    @Size(max = 225,min = 6)
    @NotNull
    private String password;
    @Size(max = 12,min = 11)
    @NotNull
    private String phone;

    /**
     * 0：正常
1：注销账户
2：封禁
     */
    @Min(0)
    @Max(2)
    private Integer status;

    @TableField("cardCase")
    @Size(max = 25)
    private String cardCase;

    private LocalDate time;

    @Size(max = 55)
    private String handUrl;

    /**
     * F：女
M：男
     */
    private String gender;




    @Override
    public String toString() {
        return "User{" +
        "id=" + id +
        ", username=" + name +
        ", password=" + password +
        ", phone=" + phone +
        ", status=" + status +
        ", cardCase=" + cardCase +
        ", time=" + time +
        ", handUrl=" + handUrl +
        ", gender=" + gender +
        "}";
    }
}
